package com.example.zheng.qq.fragment;


import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.example.zheng.qq.R;
import com.example.zheng.qq.entity.UseName;
import com.example.zheng.qq.util.Util;
import com.example.zheng.qq.view.Circle1;
import java.io.FileNotFoundException;

public class MainDrawer extends Fragment{
    public static final int CHOOSE_PHOTO=2;
    ImageView image1;
    ViewGroup mContainer;
    public static UseName useName;
    SQLiteDatabase mDb=Util.Db;
    public MainDrawer(){
        super();
    }
    public static void init(UseName useName1){
        useName=useName1;
    }
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        mContainer=container;
        View v=inflater.inflate(R.layout.main_drawer,container,false);
        image1=(ImageView)v.findViewById(R.id.resource1);


        return v;
    }

    @Override
    public void onStart() {
        Log.d("qq","主菜单开始了");
        String name=useName.getName();
        Util.SqlPictureId(name,image1);
        super.onStart();
    }

}
